package com.gree.elasticsearch.initializer;

import com.gree.elasticsearch.beanfactorypostprocessor.LocalBeanFactoryPostProcessor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.ApplicationContextInitializer;
import org.springframework.context.ConfigurableApplicationContext;

/**
 * 总有刁民想害朕，请叫我小花狗
 * create by zxw on 2020/4/29
 */
public class LocalApplicationContextInitalizer implements ApplicationContextInitializer {
    private Logger log = LoggerFactory.getLogger(LocalApplicationContextInitalizer.class.getName());

    @Override
    public void initialize(ConfigurableApplicationContext configurableApplicationContext) {
        log.debug("spring application LocalApplicationContextInitalizer initial");
        configurableApplicationContext.addBeanFactoryPostProcessor(new LocalBeanFactoryPostProcessor());
    }
}
